<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 [#include "/webpage/common/common_css.html"/]   

<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15" height="30"><img src="${cache}/images/tab_03.gif" width="15" height="30" /></td>
        <td width="1101" background="${cache}/images/tab_05.gif">
        <img src="${cache}/images/311.gif" width="16" height="16" /> 
		    <span class="STYLE4">${title}</span></td>
        <td width="281" background="${cache}/images/tab_05.gif" style="text-align:right;cursor:pointer" 
             onclick="location.href='${base}/scheduleMain.do';" 
         >
              <img src="${cache}/images/002.gif" width="14" height="14" />
              <label style="font-size:12px;">返回</label>
        </td>
        <td width="14"><img src="${cache}/images/tab_07.gif" width="14" height="30" /></td>
      </tr>
    </table>
	</td>
  </tr>
  <tr>
    <td>
	   <table width="100%" border="0" cellspacing="0" cellpadding="0" >
       <tr style="height:20px;">
        <td width="9" background="${cache}/images/tab_12.gif">&nbsp;</td>
        <td bgcolor="#f3ffe3" style="width:20%"></td>
        <td bgcolor="#f3ffe3" ></td>
        <td width="9" background="${cache}/images/tab_16.gif">&nbsp;</td>
      </tr>
      <tr>
        <td width="9" background="${cache}/images/tab_12.gif">&nbsp;</td>
         <td bgcolor="#f3ffe3" style="width:10%"></td>
        <td bgcolor="#f3ffe3">  
                <form id="scheduleForm" method="post"  action="${base}/${action}"> 
                  <input name="schedule*id" value="${schedule.id!}" type="hidden" />
                  <table style="width:100%;font-size:12px;" cellspacing="5px" cellpadding="5px">
                       <tr>
                          <td style="text-align:right">任务名称:</td>
                          <td style="text-align:left">
                            <input name="schedule*scheduleName"   value="${schedule.scheduleName!}"/>
                          </td>
                       </tr>
                        <tr>
                          <td style="text-align:right">任务组名:</td>
                          <td style="text-align:left">
                              <input name="schedule*scheduleGroup" id="menuName"  value="${schedule.scheduleGroup!}"/>
                          </td>
                       </tr>
                       <tr>
                          <td style="text-align:right">任务描述:</td>
                          <td style="text-align:left">
                              <textarea name="schedule*scheduleDesc" cols="30" rows="4">${schedule.scheduleDesc!}</textarea>
                          </td>
                       </tr>
                        <tr>
                          <td style="text-align:right">状态:</td>
                          <td style="text-align:left">
                              <select name="schedule*scheduleStatus" style="width:150px">  
                                 <option value="Y" 
                                 [#if schedule.scheduleStatus?exists&&schedule.scheduleStatus='Y']selected[/#if]>启用</option>     
                                 <option value="N"
                                 [#if schedule.scheduleStatus?exists&&schedule.scheduleStatus='N']selected[/#if]>停用</option>         
                              </select>
                          </td>
                       </tr>
                       <tr>
                          <td style="text-align:right">任务类型:</td>
                          <td style="text-align:left">
                              <select name="schedule*scheduleType" style="width:150px" id="scheduleType"
                                    onchange="changeScheduleExpression()" 
                              >  
                                 <option value="simple" 
                                 [#if schedule.scheduleType?exists&&schedule.scheduleType='simple']selected[/#if]>简易触发</option> 
                                 <option value="corn"
                                 [#if schedule.scheduleType?exists&&schedule.scheduleType='corn']selected[/#if]>表达式触发</option>                              </select>
                          </td>
                       </tr>
                       <tr id="simpleTr">
                          <td style="text-align:right">循环次数:</td>
                          <td style="text-align:left">
                              <input name="schedule*scheduleRepeat" 
                              maxlength="8" 
                              value="${schedule.scheduleRepeat!}" style="width:80px">
                              &nbsp;&nbsp;<label>循环频次:</label>
                              <input name="schedule*scheduleRepeatInterval" style="width:80px" 
                               maxlength="8" value="${schedule.scheduleRepeatInterval!}">秒
                          </td>
                       </tr>
                       <tr id="cornTr">
                          <td style="text-align:right">表达式:</td>
                          <td style="text-align:left">
                              <input name="schedule*scheduleExpression" value="${schedule.scheduleExpression!}">
                          </td>
                       </tr>
                       <tr>
                          <td style="text-align:right">任务程序:</td>
                          <td style="text-align:left">
                              <select name="schedule*scheduleProgram"  style="width:150px">
                                 [#list scheduleProgram as sg]
                                    <option value="${sg.menuCode}"
                                    [#if schedule.scheduleProgram?exists&&schedule.scheduleProgram=sg.menuCode]selected[/#if]
                                    >${sg.menuName}</option>
                                 [/#list]
                              </select>
                          </td>
                       </tr>
                        <tr>
                          <td style="text-align:right">调度时间:</td>
                          <td style="text-align:left">
                              <input name="schedule*scheduleDate" 
                              value="[#if schedule.scheduleDate?exists]${schedule.scheduleDate?string('yyyy-MM-dd HH:mm')}[/#if]" readonly="true" onclick="new WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})">
                          </td>
                       </tr>
                        <tr>
                          <td style="text-align:right">调度地址:</td>
                          <td style="text-align:left">
                              <input name="schedule*scheduleAddress" value="${schedule.scheduleAddress!}">
                          </td>
                       </tr>
                        <tr style="height:15px;">
                          <td colspan="2">
                          </td>
                       </tr> 
                        <tr>
                          <td style="width:15%"></td>
                          <td>
                              <input type="button" value="保存" onclick="saveSchedule()" />
                                &nbsp;&nbsp;
                               <input type="reset" value="重置"/>
                          </td>
                       </tr> 
                    </table>
               </form> 
        </td>
        <td width="9" background="${cache}/images/tab_16.gif">&nbsp;</td>
      </tr>
    </table>
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr height="30">
        <td width="15" >
        <img src="${cache}/images/tab_20.gif" width="15"   /></td>
        <td background="${cache}/images/tab_21.gif" style="text-align:center"> 
        </td>
        <td width="14"><img src="${cache}/images/tab_22.gif" width="14"  /></td>
      </tr> 
</table>
[#include "/webpage/common/common_js.html"/]    
<script type="text/javascript" src="${cache}/js/schedule/schedule.js"></script>
<script type="text/javascript"> 
   jQuery(function()
    {   
         changeScheduleExpression();
    }
    ); 
</script>
</body>
</html>
